package sort;

import sort.impl.*;

import java.util.Random;
import java.util.Scanner;

public class Test {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int bound = 2 * n;
        Random random = new Random();
        Integer[] arr = new Integer[n];
        System.out.println("待排序：");
        for(int i = 0; i<n; i++){
            arr[i] = random.nextInt(bound);
            System.out.print(arr[i] + "  ");
        }
        Integer[] newArr = {Integer.valueOf(27), Integer.valueOf(22), Integer.valueOf(28),
                Integer.valueOf(25), Integer.valueOf(43), Integer.valueOf(47), Integer.valueOf(17)};
        sort(newArr);
        System.out.println("\n\n已排序：");
        for(int i = 0; i < n; i++){
            System.out.print(arr[i] + "  ");
        }
    }

    private static void sort(Comparable[] arr){
        BaseSort sortter = new QuickSort();
        sortter.sort(arr);
    }

}
